package com.gitee.feizns.quickstart.spring.boot.autoconfigure;

import com.gitee.feizns.quickstart.spring.AppUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Lazy;

/**
 * spring 容器启动默认配置
 * @link <a href="https://blog.csdn.net/u010316188/article/details/106946051">springboot自定义starter</a>
 * @author feizns
 * @since 2023/2/3
 */
public class AppAutoConfiguration {

    /**
     * spring 容器工具类
     * @return {@link AppUtils}
     */
    @Bean
    @ConditionalOnMissingBean
    public AppUtils appUtils() {
        return new AppUtils();
    }

    /**
     * spring boot工具类
     * @return {@link SpringBoots }
     */
    @Bean
    @ConditionalOnMissingBean
    public SpringBoots springBoots() {
        return new SpringBoots();
    }

}
